#pragma once
#include "Control.h"
#include <gl/glaux.h>

namespace Spore
{
	class ImageView : public Control
	{
	public:
		ImageView(const char* name,const char* lable,Control* pParent = NULL,int x = 5,int y = 5,int width = 15,int height = 15);
		virtual ~ImageView(void);

		virtual void OnPaint();

		virtual void OnMouse(int button, int state,int x,int y);

		virtual bool Hover_Detect(int x,int y);

		bool    SetImage(const char* path);

	protected:
		void  draw( int x, int y, int w, int h );
		void  draw_iamge();

	private:
		Control* m_pParent;
		char*    m_strName;
		char*    m_strLable;
		int      m_iPosX;
		int      m_iPosY;
		int      m_iWidth;
		int      m_iHeight;
	};
}